package design.singleDesign;

public class ThreadlocalDesign {
    private ThreadlocalDesign(){};
//重写initialValue方法
    private static final ThreadLocal<ThreadlocalDesign> threadLocalInstance = new ThreadLocal<ThreadlocalDesign>(){
        protected  ThreadlocalDesign  initialValue(){
            return new ThreadlocalDesign();
        }
    };

//访问点
    public static ThreadlocalDesign getInstance(){
        return threadLocalInstance.get();
    }




}
